<div class="conteiner">
    	<div class="left">
        	<div class="lenta-title">
        <% if @user %>
        			Журнал юзера <strong><%=link_to @user.login, user_path(@user.login)%></strong>
        <% elsif @community %>
          			Сообщество <strong><%=link_to @community.title, community_path(@community)%></strong>
        <% end %>
            </div>
            <div class="prev">
            	<%= link_to "предыдущие 20", (@user ? user_posts_path(@user, :page=>@posts.previous_page) : community_posts_path(@community, :page=>@posts.previous_page)) if @posts.previous_page %> 
            </div> 
			<%= render :partial => "post", :collection=>@posts%>
    	</div>
</div>

<% if @posts.next_page %>
<div class="lenta-frame">
	<div class="conteiner">
		<div class="left">
	    	<div class="next">
	        	<div>
	    			<%= link_to "следующие 20", ( @user ? user_posts_path(@user, :page=>@posts.next_page) : community_posts_path(@community, :page=>@posts.next_page)) %>
	            </div>
	        </div>
	    </div>
	</div>
</div>
<% end %>

